import request, { uaaUrl } from "@/utils/request";

//通知公告列表
export function getCommonInformList(data) {
  return request({
    url: uaaUrl() + "api-business/v1/commonInform/list",
    method: "post",
    data,
  });
}
//通知公告详情
export function getCommonInformDetail(id, type) {
  return request({
    url:
      uaaUrl() +
      `api-business/v1/commonInform/getCommonInformDetail/${id}/${type}`,
    method: "get",
  });
}
//项目申报-筛选（计划类别）
export function getPlanTypeList() {
  return request({
    url: uaaUrl() + `api-form/v1/businessCenter/getPlanTypeList`,
    method: "get",
    headers: {
      isToken: false,
    },
  });
}
//项目申报列表
export function findProjectInfoListPage(params) {
  return request({
    url: uaaUrl() + `api-form/v1/businessCenter/findProjectInfoListPage`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  });
}
export function projectNameList(userId) {
  return request({
    url: uaaUrl() + `api-form/v1/gateway/projectNameList?userId=` + userId,
    method: "get",
  });
}
//公开公示
export function findProjectPublicAnnouncementListPage(data) {
  return request({
    url: uaaUrl() + "api-business/v1/publicityOpen/list",
    method: "post",
    data,
  });
}
//成果公示
export function searchAllPublicNoUser(data) {
  return request({
    url: uaaUrl() + "api-outcome-reg/v1/approve/searchAllPublicNoUser",
    method: "post",
    headers: {
      isToken: false,
    },
    data,
  });
}
//公开公示详情
export function getPublicityOpenDetail(id, type) {
  return request({
    url:
      uaaUrl() +
      `api-business/v1/publicityOpen/getPublicityOpenDetail/${id}/${type}`,
    method: "get",
  });
}
//首页统计数
export function getStatisticsNumber1(params) {
  return request({
    url: uaaUrl() + `api-guide-form/v1/businessCenter/getStatisticsNumber`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  });
}
export function getStatisticsNumber(params) {
  return request({
    url: uaaUrl() + `api-form/v1/businessCenter/getStatisticsNumber`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  });
}
//工作台数据概览-申报者
export function workPlatApplyDataStatistics(userId) {
  return request({
    url:
      uaaUrl() +
      `api-form/v1/businessCenter/workPlatApplyDataStatistics?userId=${userId}`,
    method: "get",
    headers: {
      isToken: false,
    },
  });
}
//工作台数据概览-政务部门
export function workPlatZwDataStatistics(userId) {
  return request({
    url:
      uaaUrl() +
      `api-form/v1/businessCenter/workPlatZwDataStatistics?userId=${userId}`,
    method: "get",
    headers: {
      isToken: false,
    },
  });
}
//工作台数据概览-指南发布数
export function getGuideWeavePublishNumber() {
  return request({
    url: uaaUrl() + `api-guide-form/v1/businessCenter/getGuideWeavePublishNumber`,
    method: "get",
    headers: {
      isToken: false,
    },
  });
}
//添加收藏
export function addCollection(data) {
  return request({
    url: uaaUrl() + `api-system/v1/collection`,
    method: "post",
    data,
  });
}
//取消收藏
export function cancelCollection(id) {
  return request({
    url: uaaUrl() + "api-system/v1/collection/cancelCollection/" + id,
    method: "get",
  });
}
//指南征集列表
export function findCallNoticeTbListPage(params) {
  return request({
    url: uaaUrl() + `api-guide-form/v1/callNotice/findCallNoticeTbListPage`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  });
}
//指南计划类别
export function getDictByType(params) {
  return request({
    url: uaaUrl() + `api-guide-form/v1/projectInfo/getDictByType`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  })
}
// 项目申报校验
export function rulesCheckBeforeApply(query) {
  return request({
    url: uaaUrl() + 'api-form/v1/approve/rulesCheckBeforeApply/' + query,
    method: 'get',
  })
}
//办理事项
export function getWorkItemList(data) {
  return request({
    url: uaaUrl() + `api-system/v1/workItem/getWorkItemList`,
    method: "post",
    data,
  });
}

// 科技奖励列表
export function getRewardList(params) {
  return request({
    url: uaaUrl() + `api-award/v1/businessCenter/findProjectInfoListPage`,
    method: "get",
    headers: {
      isToken: false,
    },
    params,
  });
}
// 科技奖励rulesCheckBeforeApply
export function rulesCheckBeforeApplyReward(query) {
  return request({
    url: uaaUrl() + 'api-award/v1/approve/rulesCheckBeforeApply/' + query,
    method: 'get',
  })
}

// 获取轮播图
export function getSysBannerList(data) {
  return request({
    url:uaaUrl()+ 'api-business/v1/sysBanner/getSysBannerList',
    method: 'post',
    data
  })
}
